package framework.model;

import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

import framework.utils.dto.Challenge;

/**
 * This class contains login data
 * @author Michel Jansma
 * @version 0.1
 */
public class LoginModel extends Model {

	private String username;
	private boolean loggedIn;
	
	public LoginModel(){
		this.setUsername(null);
		this.setLoggedIn(false);
	};
	
	public void setUsername(String username) {
		this.username = username;
		super.dispatchEvent(new ActionEvent(this,0,"login_updated"));
	};
	
	public void setLoggedIn(boolean loggedIn) {
		this.loggedIn = loggedIn;
		super.dispatchEvent(new ActionEvent(this,0,"login_updated"));
	};

	public String getUsername() {
		return this.username;
	};
	
	public boolean isLoggedIn() {
		return this.loggedIn;
	};
	

	
}
